import path from "path";

import Koa from 'koa'
import koaBody from "koa-body";
import serve from 'koa-static'

import routers from './routers'

const app = new Koa()

app.use(koaBody({
  multipart: true,
  formidable: {
    maxFileSize: 1024 * 1024 * 10,
  },
}))
app.use(serve(path.join(__dirname, '../static')))
app.use(routers.routes())

// // export default app
export = app
